﻿<?xml version="1.0" encoding="utf-8"?>
<!-- 
####################################################################################################################

BE AWARE THAT THE ORDER IN WHICH TYPES ARE DESCRIBED IN THE PROVIDER MANIFEST IS RELEVANT AND HAVE IMPACT IN LOOKUP
PROCESS

#################################################################################################################### 
-->
<ProviderManifest Namespace="Jet" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/providermanifest">
  <Types>
    <Type Name="tinyint" PrimitiveTypeKind="Byte">
    </Type>
    <Type Name="smallint" PrimitiveTypeKind="Int16">
    </Type>
    <Type Name="int" PrimitiveTypeKind="Int32">
    </Type>
    <Type Name="bigint" PrimitiveTypeKind="Int64">
    </Type>
    <Type Name="float" PrimitiveTypeKind="Double">
    </Type>
    <Type Name="real" PrimitiveTypeKind="Single">
    </Type>
    <Type Name="guid" PrimitiveTypeKind="Guid">
    </Type>
    <Type Name="decimal" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision Minimum="1" Maximum="38" DefaultValue="18" Constant="false" />
        <Scale Minimum="0" Maximum="38" DefaultValue="0" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="numeric" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision Minimum="1" Maximum="38" DefaultValue="18" Constant="false" />
        <Scale Minimum="0" Maximum="38" DefaultValue="0" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="smallmoney" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision DefaultValue="10" Constant="true" />
        <Scale DefaultValue="4" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="money" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision DefaultValue="19" Constant="true" />
        <Scale DefaultValue="4" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="binary" PrimitiveTypeKind="Binary">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="255" DefaultValue="50" Constant="false" />
        <FixedLength DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="varbinary" PrimitiveTypeKind="Binary">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="255" DefaultValue="50" Constant="false" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="image" PrimitiveTypeKind="Binary" >
      <FacetDescriptions>
        <MaxLength DefaultValue="2147483647" Constant="true" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="bit" PrimitiveTypeKind="Boolean">
    </Type>
    <Type Name="datetime" PrimitiveTypeKind="DateTime">
      <FacetDescriptions>
          <Precision DefaultValue="3" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="time" PrimitiveTypeKind="Time">
      <FacetDescriptions>
        <Precision Minimum="0" Maximum="7" DefaultValue="7" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="varchar" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="255" DefaultValue="50" Constant="false" />
        <Unicode DefaultValue="false" Constant="true" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="char" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="255" DefaultValue="50" Constant="false" />
        <Unicode DefaultValue="false" Constant="true" />
        <FixedLength DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="text" PrimitiveTypeKind="String" >
      <FacetDescriptions>
        <MaxLength DefaultValue="2147483647" Constant="true" />
        <Unicode DefaultValue="false" Constant="true" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
  </Types>
  <Functions>

    <!-- BEGIN AGGREGATES ############################################# -->
    <!-- AVG -->
    <Function Name="AVG" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="AVG" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="AVG" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="AVG" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

    <!-- COUNT -->
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Boolean)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(DateTimeOffset)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Time)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Guid)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="COUNT" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>

    <!-- MAX -->
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Byte" />
      <Parameter Name="arg" Type="Collection(Byte)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int16" />
      <Parameter Name="arg" Type="Collection(Int16)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Single" />
      <Parameter Name="arg" Type="Collection(Single)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Time" />
      <Parameter Name="arg" Type="Collection(Time)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTimeOffset" />
      <Parameter Name="arg" Type="Collection(DateTimeOffset)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="MAX" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>

    <!-- MIN -->
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Byte" />
      <Parameter Name="arg" Type="Collection(Byte)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int16" />
      <Parameter Name="arg" Type="Collection(Int16)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Single" />
      <Parameter Name="arg" Type="Collection(Single)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Time" />
      <Parameter Name="arg" Type="Collection(Time)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTimeOffset" />
      <Parameter Name="arg" Type="Collection(DateTimeOffset)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="MIN" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>


    <!-- FIRST -->
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Byte" />
      <Parameter Name="arg" Type="Collection(Byte)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int16" />
      <Parameter Name="arg" Type="Collection(Int16)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Single" />
      <Parameter Name="arg" Type="Collection(Single)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Time" />
      <Parameter Name="arg" Type="Collection(Time)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTimeOffset" />
      <Parameter Name="arg" Type="Collection(DateTimeOffset)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="FIRST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>

    <!-- LAST -->
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Byte" />
      <Parameter Name="arg" Type="Collection(Byte)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int16" />
      <Parameter Name="arg" Type="Collection(Int16)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Single" />
      <Parameter Name="arg" Type="Collection(Single)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="arg" Type="Collection(DateTime)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Time" />
      <Parameter Name="arg" Type="Collection(Time)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="DateTimeOffset" />
      <Parameter Name="arg" Type="Collection(DateTimeOffset)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="arg" Type="Collection(String)" Mode="In" />
    </Function>
    <Function Name="LAST" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="arg" Type="Collection(Binary)" Mode="In" />
    </Function>


    <!-- SUM -->
    <Function Name="SUM" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Collection(Int32)" Mode="In" />
    </Function>
    <Function Name="SUM" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Collection(Int64)" Mode="In" />
    </Function>
    <Function Name="SUM" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>
    <Function Name="SUM" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

    <!-- STDEV -->
    <Function Name="STDEV" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

    <Function Name="STDEV" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>


      <!-- STDEVP -->
    <Function Name="STDEVP" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

      <Function Name="STDEVP" Aggregate="true" BuiltIn="true">
          <ReturnType Type="Double" />
          <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
      </Function>      

    <!-- VAR -->
    <Function Name="VAR" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

    <Function Name="VAR" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>

      <!-- VARP -->
    <Function Name="VARP" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Double)" Mode="In" />
    </Function>

    <Function Name="VARP" Aggregate="true" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Collection(Decimal)" Mode="In" />
    </Function>


      <!-- END AGGREGATES ############################################# -->

    <!-- BEGIN STRING FUNCTIONS ##################################### -->
    <!-- ASCII( arg ) 
                arg1: char, varchar (nvarchar is allowed by SQL server)
                returns: int   
        -->
    <Function Name="ASCII" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="String" Mode="In" />
    </Function>

    <!-- CHAR( arg )
                arg: tinyint, *smallint, *int, *bigint
                returns: char(1)
        -->
    <Function Name="CHAR" BuiltIn="true">
      <ReturnType Type="String"/>
      <Parameter Name="arg" Type="Int32" Mode="In" />
    </Function>

    <!-- CHARINDEX( strSearch, strTarget [, startLocation ] )
                strSearch: character expression
                strTarget: character expression
                startLocation: tinyint, smallint, int, bigint
                returns: int, bigint   
        -->
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="strSearch" Type="String" Mode="In" />
      <Parameter Name="strTarget" Type="String" Mode="In" />
    </Function>
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="strSearch" Type="Binary" Mode="In" />
      <Parameter Name="strTarget" Type="Binary" Mode="In" />
    </Function>
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="strSearch" Type="String" Mode="In" />
      <Parameter Name="strTarget" Type="String" Mode="In" />
      <Parameter Name="startLocation" Type="Int32" Mode="In" />
    </Function>
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="strSearch" Type="Binary" Mode="In" />
      <Parameter Name="strTarget" Type="Binary" Mode="In" />
      <Parameter Name="startLocation" Type="Int32" Mode="In" />
    </Function>
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="strSearch" Type="String" Mode="In" />
      <Parameter Name="strTarget" Type="String" Mode="In" />
      <Parameter Name="startLocation" Type="Int64" Mode="In" />
    </Function>
    <Function Name="INSTR" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="strSearch" Type="Binary" Mode="In" />
      <Parameter Name="strTarget" Type="Binary" Mode="In" />
      <Parameter Name="startLocation" Type="Int64" Mode="In" />
    </Function>

    <!-- LEFT( str, count ) 
                str: char, nchar, varchar, nvarchar, varchar(max), nvarchar(max)
                count: tinyint, smallint, int, bigint
                returns: varchar, nvarchar
        -->
    <Function Name="LEFT" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
      <Parameter Name="count" Type="Int64" Mode="In" />
    </Function>

    <!-- LEN( string_expression )
                string_expression: char, nchar, varchar, nvarchar, varchar(max), nvarchar(max)
                returns: int, bigint   
        -->
    <Function Name="LEN" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="string_expression" Type="String" Mode="In" />
    </Function>
    <Function Name="LEN" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="string_expression" Type="Binary" Mode="In" />
    </Function>

    <!-- LCASE( str ) 
            str: char, varchar, text
            returns: varchar
        -->
    <Function Name="LCASE" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
    </Function>


    <!-- LTRIM( str ) 
            str: char, varchar, text
            returns: varchar
        -->
    <Function Name="LTRIM" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
    </Function>


    <!-- REPLACE( strTarget, strSearch, strReplacement )
            strTarget: char, varchar, text
            strSearch: char, varchar, text
            strReplacement: char, varchar, text
            returns: varchar
        -->
    <Function Name="REPLACE" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="strTarget" Type="String"  Mode="In" />
      <Parameter Name="strSearch" Type="String"  Mode="In" />
      <Parameter Name="strReplacement" Type="String"  Mode="In" />
    </Function>

    <!-- STRING( count, strSource )
            strSource: varchar
            count: tinyint, smallint, int
            returns: varchar
        -->
    <Function Name="STRING" BuiltIn="true">
      <ReturnType Type="String"  />
      <Parameter Name="count" Type="Int32" Mode="In" />
      <Parameter Name="strTarget" Type="String" Mode="In" />
    </Function>

    <!-- RIGHT( str, count ) 
                str: char, varchar, text
                count: tinyint, smallint, int
                returns: varchar
        -->
    <Function Name="RIGHT" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
      <Parameter Name="count" Type="Int64" Mode="In" />
    </Function>

    <!-- RTRIM( arg1 ) 
            str: char, varchar, text
            returns: varchar
        -->
    <Function Name="RTRIM" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
    </Function>

    <!-- SPACE( arg ) 
            arg: tinyint, smallint, int
            returns: char   
        -->
    <Function Name="SPACE" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="arg1" Type="Int32" Mode="In" />
    </Function>

    <!-- STR( number ) 
                number: float
                length: int
                decimal: int
                returns: char   
        -->
    <Function Name="STR" BuiltIn="true">
      <ReturnType Type="String"  />
      <Parameter Name="number" Type="Double" Mode="In" />
    </Function>
    <Function Name="STR" BuiltIn="true">
      <ReturnType Type="String"  />
      <Parameter Name="number" Type="Decimal" Mode="In" />
    </Function>


    <!-- Mid( str, start[, length] )
                str: char, nchar, varchar, nvarchar, varchar(max), nvarchar(max)
                start: tinyint, smallint, int, bigint
                length: tinyint, smallint, int, bigint
                returns: varchar, nvarchar
        -->
    <Function Name="MID" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
      <Parameter Name="start" Type="Int64" Mode="In" />
    </Function>
    <Function Name="MID" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="str" Type="Binary" Mode="In" />
      <Parameter Name="start" Type="Int64" Mode="In" />
    </Function>
    <Function Name="MID" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
      <Parameter Name="start" Type="Int64" Mode="In" />
      <Parameter Name="length" Type="Int64" Mode="In" />
    </Function>
    <Function Name="MID" BuiltIn="true">
      <ReturnType Type="Binary" />
      <Parameter Name="str" Type="Binary" Mode="In" />
      <Parameter Name="start" Type="Int64" Mode="In" />
      <Parameter Name="length" Type="Int64" Mode="In" />
    </Function>

    <!-- ASCW( arg ) 
            arg: char, varchar
            returns: int   
        -->
    <Function Name="ASCW" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="String" Mode="In" />
    </Function>

    <!-- UCASE( arg ) 
                str: char, nchar, varchar, nvarchar, varchar(max), nvarchar(max)
                returns: varchar, nvarchar   
        -->
    <Function Name="UCASE" BuiltIn="true">
      <ReturnType Type="String" />
      <Parameter Name="str" Type="String" Mode="In" />
    </Function>

    <!-- END STRING FUNCTIONS ####################################### -->

    <!-- BEGIN MATH FUNCTIONS ####################################### -->
    <!-- ABS( arg )
                arg: tinyint, smallint, int, bigint, numeric, decimal, smallmoney, money, real, float
                returns: tinyint, smallint, int, bigint, numeric, decimal, smallmoney, money, real, float
        -->
    <Function Name="ABS" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ABS" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Int64" Mode="In" />
    </Function>
    <Function Name="ABS" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>
    <Function Name="ABS" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>


      <!-- ATN( arg )
                arg: float
                returns: float   
        -->
    <Function Name="ATN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>

    <Function Name="ATN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>



      <!-- COS( arg )
                arg: float
                returns: float   
        -->
    <Function Name="COS" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>

    <Function Name="COS" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>


    <!-- EXP( arg )
                arg: float
                returns: float   
        -->
    <Function Name="EXP" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>

    <Function Name="EXP" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>
 
    <!-- LOG( arg )
            arg: float
            returns: float   
     -->
    <Function Name="LOG" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>
    <Function Name="LOG" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>



    <!-- RND( [seed] )
                seed: tinyint, smallint, int
                returns: float
        -->
    <Function Name="RND" BuiltIn="true">
      <ReturnType Type="Double" />
    </Function>
    <Function Name="RND" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="seed" Type="Int32" Mode="In" />
    </Function>

    <!-- ROUND( numeric_expression, length [ ,function ] )
                numeric_expression: tinyint, smallint, int, numeric, decimal, smallmoney, money, real, float
                length: tinyint, smallint, int
                function: tinyint, smallint, int
                returns: tinyint, smallint, int, numeric, decimal, smallmoney, money, real, float
        -->
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="numeric_expression" Type="Int32" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="numeric_expression" Type="Int64" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="numeric_expression" Type="Decimal" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="numeric_expression" Type="Double" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="numeric_expression" Type="Int32" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
      <Parameter Name="function" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="numeric_expression" Type="Int64" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
      <Parameter Name="function" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="numeric_expression" Type="Decimal" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
      <Parameter Name="function" Type="Int32" Mode="In" />
    </Function>
    <Function Name="ROUND" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="numeric_expression" Type="Double" Mode="In" />
      <Parameter Name="length" Type="Int32" Mode="In" />
      <Parameter Name="function" Type="Int32" Mode="In" />
    </Function>

    <!-- SGN( arg )
            arg: tinyint, smallint, int, numeric, decimal, smallmoney, money, real, float
            returns: bigint, numeric, decimal, money, float
        -->
    <Function Name="SGN" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="Int32" Mode="In" />
    </Function>
    <Function Name="SGN" BuiltIn="true">
      <ReturnType Type="Int64" />
      <Parameter Name="arg" Type="Int64" Mode="In" />
    </Function>
    <Function Name="SGN" BuiltIn="true">
      <ReturnType Type="Decimal" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>
    <Function Name="SGN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>

    <!-- SIN( arg )
                arg: float
                returns: float   
        -->
    <Function Name="SIN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>
    <Function Name="SIN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>

    <!-- SQR( arg )
                arg: float
                returns: float   
        -->
    <Function Name="SQR" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>
    <Function Name="SQR" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>

    <!-- TAN( arg )
                arg: float
                returns: float   
        -->
    <Function Name="TAN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Double" Mode="In" />
    </Function>
    <Function Name="TAN" BuiltIn="true">
      <ReturnType Type="Double" />
      <Parameter Name="arg" Type="Decimal" Mode="In" />
    </Function>

      <!-- END MATH FUNCTIONS ######################################### -->


    <!-- BEGIN DATE FUNCTIONS ####################################### -->
    <!-- DATEADD 
                datepart: nvarchar
                number: tinyint, smallint, int, bigint, numeric, decimal, real, float
                date: smalldatetime, datetime, varchar, nvarchar, char, nchar
                returns: SMALLTIME, datetime   
        -->
    <Function Name="DATEADD" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="number" Type="Double" Mode="In" />
      <Parameter Name="date" Type="DateTime" Mode="In" />
    </Function>
    <Function Name="DATEADD" BuiltIn="true">
      <ReturnType Type="Time" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="number" Type="Double" Mode="In" />
      <Parameter Name="time" Type="Time" Mode="In" />
    </Function>
    <Function Name="DATEADD" BuiltIn="true">
      <ReturnType Type="DateTimeOffset" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="number" Type="Double" Mode="In" />
      <Parameter Name="datetimeoffset" Type="DateTimeOffset" Mode="In" />
    </Function>
    <Function Name="DATEADD" BuiltIn="true">
      <ReturnType Type="DateTime" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="number" Type="Double" Mode="In" />
      <Parameter Name="date" Type="String" Mode="In" />
    </Function>

      <!-- DATEDIFF( datepart, startdate, enddate )
                datepart: varchar
                startdate: datetime, time
                enddate: datetime, time
                returns: int   
        -->
    <Function Name="DATEDIFF" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="startdate" Type="DateTime" Mode="In" />
      <Parameter Name="enddate" Type="DateTime" Mode="In" />
    </Function>
    <Function Name="DATEDIFF" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="startdate" Type="Time" Mode="In" />
      <Parameter Name="enddate" Type="Time" Mode="In" />
    </Function>
    <Function Name="DATEDIFF" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="startdate" Type="Time" Mode="In" />
      <Parameter Name="enddate" Type="DateTime" Mode="In" />
    </Function>
    <Function Name="DATEDIFF" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="startdate" Type="DateTime" Mode="In" />
      <Parameter Name="enddate" Type="Time" Mode="In" />
    </Function>

    <!-- DATEPART( datepart, date )
                datepart: varchar
                date: datetime, time
                returns: int   
        -->
    <Function Name="DATEPART" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="date" Type="DateTime" Mode="In" />
    </Function>
    <Function Name="DATEPART" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="datepart" Type="String" Mode="In" />
      <Parameter Name="date" Type="Time" Mode="In" />
    </Function>

    <!-- DAY( date )
            date: datetime
            returns: int   
        -->
    <Function Name="DAY" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="date" Type="DateTime" Mode="In" />
    </Function>
    <!-- NOW()
            returns: datetime   
        -->
    <Function Name="NOW" BuiltIn="true">
      <ReturnType Type="DateTime"/>
    </Function>

    <!-- MONTH( date )
                date: datetime
                returns: int   
        -->
    <Function Name="MONTH" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="date" Type="DateTime" Mode="In" />
    </Function>

    <!-- YEAR( date )
            date: smalldatetime, datetime
            returns: int   
        -->
    <Function Name="YEAR" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="date" Type="DateTime" Mode="In" />
    </Function>
    <!-- END DATE FUNCTIONS ######################################### -->

    <!-- BEGIN SYSTEM FUNCTIONS ##################################### -->
    <!-- ISNUMERIC( arg ) //implicit conversion -->
    <Function Name="ISNUMERIC" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="String" Mode="In" />
    </Function>

    <!-- ISDATE( arg ) //implicit conversion -->
    <Function Name="ISDATE" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="String" Mode="In" />
    </Function>

    <!-- ISNULL( arg ) //implicit conversion -->
    <Function Name="ISNULL" BuiltIn="true">
      <ReturnType Type="Int32" />
      <Parameter Name="arg" Type="String" Mode="In" />
    </Function>


    <!-- END SYSTEM FUNCTIONS ####################################### -->
  </Functions>
</ProviderManifest>
